package cn.pxs.service;

import cn.pxs.entity.Book;
import cn.pxs.entity.LargeFile;
import cn.pxs.entity.NewBook;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;
import java.util.Map;

//书本业务接口
public interface BookService {
    List<NewBook> findAll();

    NewBook findById(Integer id);

    List<NewBook> findByPage(Integer start,Integer num);

    int findByLine();

    void add(LargeFile largeFile, NewBook newBook);

    NewBook updateOrAdd(MultipartFile file,LargeFile largeFile, NewBook newBook);

    List<NewBook> findBookByPage(Integer start, Integer num,Integer typeid);

    int findByTypeIDLine(Integer typeid);

    void updateRate(Integer id);

    List<NewBook> findSale5();

    List<NewBook> findRate5();

    List<NewBook> findFav5();

    List<NewBook> findBookByPageRate(Integer start,Integer num,Integer typeid);

    List<NewBook> findBookByPageSale(Integer start,Integer num,Integer typeid);

    List<NewBook> findBookByPageFav(Integer start,Integer num,Integer typeid);

    List<NewBook> findIf(Integer start,Integer num,String key);

    int findByIfIDLine(String key);

}
